{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "import os\n",
    "\n",
    "from tensorflow import keras\n",
    "from tensorflow.keras import layers\n",
    "from matplotlib import pyplot as plt"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Data Loading"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Saving dcos_docker into dfs\n",
      "Saving os_linux into dfs\n",
      "Saving db_oracle_11g into dfs\n",
      "Saving mw_redis into dfs\n",
      "Saving dcos_container into dfs\n"
     ]
    }
   ],
   "source": [
    "data_path = '../../../data/train_data/host'\n",
    "dfs = {}\n",
    "for file in os.listdir(data_path):\n",
    "    print('Saving ' + file[:-4] + ' into dfs')\n",
    "    dfs[file[:-4]] = pd.read_csv(data_path+'/'+file) "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Data Preprocessing"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Model Parameters"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "def get_model(x_train):\n",
    "    model = keras.Sequential(\n",
    "        [\n",
    "            layers.Input(shape=(x_train.shape[1], x_train.shape[2])),\n",
    "            layers.Conv1D(\n",
    "                filters=32, kernel_size=7, padding=\"same\", strides=2, activation=\"relu\"\n",
    "            ),\n",
    "            layers.Dropout(rate=0.2),\n",
    "            layers.Conv1D(\n",
    "                filters=16, kernel_size=7, padding=\"same\", strides=2, activation=\"relu\"\n",
    "            ),\n",
    "            layers.Conv1DTranspose(\n",
    "                filters=16, kernel_size=7, padding=\"same\", strides=2, activation=\"relu\"\n",
    "            ),\n",
    "            layers.Dropout(rate=0.2),\n",
    "            layers.Conv1DTranspose(\n",
    "                filters=32, kernel_size=7, padding=\"same\", strides=2, activation=\"relu\"\n",
    "            ),\n",
    "            layers.Conv1DTranspose(filters=1, kernel_size=7, padding=\"same\"),\n",
    "        ]\n",
    "    )\n",
    "    model.compile(optimizer=keras.optimizers.Adam(learning_rate=0.001), loss=\"mse\")\n",
    "    return model\n",
    "\n",
    "def train_model(model, x_train):\n",
    "    history = model.fit(\n",
    "        x_train,\n",
    "        x_train,\n",
    "        epochs=60,\n",
    "        batch_size=128,\n",
    "        validation_split=0.1,\n",
    "        callbacks=[\n",
    "            keras.callbacks.EarlyStopping(monitor=\"val_loss\", patience=5, mode=\"min\")\n",
    "        ],\n",
    "    )\n",
    "    return history"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Training"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.02131268193440449 0.0220447502825371\n",
      "0.0\n",
      "Training  Processor_load_5_min\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 34ms/step - loss: 0.2197 - val_loss: 0.0400\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0634 - val_loss: 0.0277\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0488 - val_loss: 0.0211\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0405 - val_loss: 0.0235\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 36ms/step - loss: 0.0345 - val_loss: 0.0308\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0304 - val_loss: 0.0365\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0278 - val_loss: 0.0352\n",
      "Epoch 8/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0254 - val_loss: 0.0406\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Processor_load_5_min/assets\n",
      "0.0003787998358534045 0.03553255528480253\n",
      "0.0\n",
      "Training  Disk_rd_ios\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Disk_rd_ios/assets\n",
      "2.0315943459444057 2.1927527312807364\n",
      "0.0\n",
      "Training  CPU_util_pct\n",
      "Epoch 1/60\n",
      "178/178 [==============================] - 6s 36ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "178/178 [==============================] - 6s 34ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "178/178 [==============================] - 6s 33ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "178/178 [==============================] - 6s 34ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "178/178 [==============================] - 6s 34ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_CPU_util_pct/assets\n",
      "0.18116140873837472 1.8359899310000962\n",
      "0.0\n",
      "Training  Disk_io_util\n",
      "Epoch 1/60\n",
      "584/584 [==============================] - 20s 35ms/step - loss: 0.1177 - val_loss: 0.0139\n",
      "Epoch 2/60\n",
      "584/584 [==============================] - 20s 34ms/step - loss: 0.0379 - val_loss: 0.0302\n",
      "Epoch 3/60\n",
      "584/584 [==============================] - 20s 35ms/step - loss: 0.0258 - val_loss: 0.0259\n",
      "Epoch 4/60\n",
      "584/584 [==============================] - 19s 33ms/step - loss: 0.0201 - val_loss: 0.0323\n",
      "Epoch 5/60\n",
      "584/584 [==============================] - 18s 32ms/step - loss: 0.0177 - val_loss: 0.0321\n",
      "Epoch 6/60\n",
      "584/584 [==============================] - 18s 32ms/step - loss: 0.0155 - val_loss: 0.0373\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Disk_io_util/assets\n",
      "232.56171085858585 83.26895580560434\n",
      "0.0\n",
      "Training  Num_of_processes\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 22ms/step - loss: 0.7962 - val_loss: 0.5370\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.3492 - val_loss: 0.1792\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.1838 - val_loss: 0.1232\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1524 - val_loss: 0.0936\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1339 - val_loss: 0.0785\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.1216 - val_loss: 0.0654\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.1121 - val_loss: 0.0571\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.1037 - val_loss: 0.0496\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0975 - val_loss: 0.0438\n",
      "Epoch 10/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0922 - val_loss: 0.0397\n",
      "Epoch 11/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0876 - val_loss: 0.0380\n",
      "Epoch 12/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0839 - val_loss: 0.0348\n",
      "Epoch 13/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0807 - val_loss: 0.0368\n",
      "Epoch 14/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0785 - val_loss: 0.0341\n",
      "Epoch 15/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0754 - val_loss: 0.0339\n",
      "Epoch 16/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0730 - val_loss: 0.0329\n",
      "Epoch 17/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0713 - val_loss: 0.0319\n",
      "Epoch 18/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0683 - val_loss: 0.0311\n",
      "Epoch 19/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0662 - val_loss: 0.0328\n",
      "Epoch 20/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0646 - val_loss: 0.0320\n",
      "Epoch 21/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0624 - val_loss: 0.0313\n",
      "Epoch 22/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0610 - val_loss: 0.0334\n",
      "Epoch 23/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0591 - val_loss: 0.0333\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Num_of_processes/assets\n",
      "0.31051343267045456 0.8186949290178418\n",
      "0.0\n",
      "Training  Send_total\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.2551 - val_loss: 0.0404\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0851 - val_loss: 0.0262\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0686 - val_loss: 0.0233\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 5s 31ms/step - loss: 0.0591 - val_loss: 0.0228\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0524 - val_loss: 0.0261\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0471 - val_loss: 0.0345\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0421 - val_loss: 0.0422\n",
      "Epoch 8/60\n",
      "179/179 [==============================] - 5s 30ms/step - loss: 0.0383 - val_loss: 0.0458\n",
      "Epoch 9/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0353 - val_loss: 0.0493\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Send_total/assets\n",
      "0.13314075248484494 0.5714202609945919\n",
      "5e-324\n",
      "Training  Outgoing_network_traffic\n",
      "Epoch 1/60\n",
      "442/442 [==============================] - 14s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "442/442 [==============================] - 14s 31ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "442/442 [==============================] - 14s 31ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "442/442 [==============================] - 14s 31ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "442/442 [==============================] - 14s 31ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Outgoing_network_traffic/assets\n",
      "65.18638101870904 23.602243581473545\n",
      "0.0\n",
      "Training  Memory_available_pct\n",
      "Epoch 1/60\n",
      "178/178 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "178/178 [==============================] - 6s 31ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "178/178 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "178/178 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "178/178 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Memory_available_pct/assets\n",
      "0.10971365258467282 0.4048632891075691\n",
      "0.0\n",
      "Training  Incoming_network_traffic\n",
      "Epoch 1/60\n",
      "442/442 [==============================] - 14s 32ms/step - loss: 0.1059 - val_loss: 0.0051\n",
      "Epoch 2/60\n",
      "442/442 [==============================] - 14s 32ms/step - loss: 0.0275 - val_loss: 0.0044\n",
      "Epoch 3/60\n",
      "442/442 [==============================] - 14s 31ms/step - loss: 0.0196 - val_loss: 0.0051\n",
      "Epoch 4/60\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "442/442 [==============================] - 14s 32ms/step - loss: 0.0162 - val_loss: 0.0046\n",
      "Epoch 5/60\n",
      "442/442 [==============================] - 14s 31ms/step - loss: 0.0140 - val_loss: 0.0049\n",
      "Epoch 6/60\n",
      "442/442 [==============================] - 14s 32ms/step - loss: 0.0126 - val_loss: 0.0050\n",
      "Epoch 7/60\n",
      "442/442 [==============================] - 14s 32ms/step - loss: 0.0117 - val_loss: 0.0062\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Incoming_network_traffic/assets\n",
      "0.021622474747474748 0.15183056697195013\n",
      "0.0\n",
      "Training  Zombie_Process\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 24ms/step - loss: 0.1938 - val_loss: 0.6671\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1150 - val_loss: 0.1741\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0453 - val_loss: 0.0832\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0296 - val_loss: 0.0583\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0257 - val_loss: 0.0522\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0239 - val_loss: 0.0467\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0219 - val_loss: 0.0425\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0203 - val_loss: 0.0428\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0196 - val_loss: 0.0400\n",
      "Epoch 10/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0188 - val_loss: 0.0378\n",
      "Epoch 11/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0176 - val_loss: 0.0378\n",
      "Epoch 12/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0166 - val_loss: 0.0366\n",
      "Epoch 13/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0165 - val_loss: 0.0352\n",
      "Epoch 14/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0156 - val_loss: 0.0347\n",
      "Epoch 15/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0152 - val_loss: 0.0332\n",
      "Epoch 16/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0149 - val_loss: 0.0350\n",
      "Epoch 17/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0142 - val_loss: 0.0324\n",
      "Epoch 18/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0138 - val_loss: 0.0370\n",
      "Epoch 19/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0141 - val_loss: 0.0330\n",
      "Epoch 20/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0135 - val_loss: 0.0306\n",
      "Epoch 21/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0127 - val_loss: 0.0316\n",
      "Epoch 22/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0127 - val_loss: 0.0310\n",
      "Epoch 23/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0122 - val_loss: 0.0299\n",
      "Epoch 24/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0114 - val_loss: 0.0267\n",
      "Epoch 25/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0119 - val_loss: 0.0307\n",
      "Epoch 26/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0111 - val_loss: 0.0277\n",
      "Epoch 27/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0116 - val_loss: 0.0307\n",
      "Epoch 28/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0105 - val_loss: 0.0285\n",
      "Epoch 29/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0104 - val_loss: 0.0293\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Zombie_Process/assets\n",
      "276.4746619336174 584.1408313987306\n",
      "0.0\n",
      "Training  Recv_total\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.2681 - val_loss: 0.0465\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0810 - val_loss: 0.0298\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0645 - val_loss: 0.0269\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 5s 31ms/step - loss: 0.0549 - val_loss: 0.0279\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0481 - val_loss: 0.0338\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0436 - val_loss: 0.0348\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0401 - val_loss: 0.0418\n",
      "Epoch 8/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0372 - val_loss: 0.0476\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Recv_total/assets\n",
      "389.36751893939396 557.6969889641118\n",
      "0.0\n",
      "Training  Page_po\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.2645 - val_loss: 0.0316\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0877 - val_loss: 0.0214\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0732 - val_loss: 0.0202\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0645 - val_loss: 0.0199\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0578 - val_loss: 0.0179\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0525 - val_loss: 0.0241\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0484 - val_loss: 0.0328\n",
      "Epoch 8/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0444 - val_loss: 0.0338\n",
      "Epoch 9/60\n",
      "179/179 [==============================] - 5s 31ms/step - loss: 0.0420 - val_loss: 0.0419\n",
      "Epoch 10/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0392 - val_loss: 0.0426\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Page_po/assets\n",
      "97.96747220660374 2.193229850081188\n",
      "0.0\n",
      "Training  CPU_idle_pct\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.3051 - val_loss: 0.0426\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0989 - val_loss: 0.0303\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0797 - val_loss: 0.0260\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0693 - val_loss: 0.0312\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0603 - val_loss: 0.0499\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0534 - val_loss: 0.0596\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0482 - val_loss: 0.0671\n",
      "Epoch 8/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0445 - val_loss: 0.0777\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_CPU_idle_pct/assets\n",
      "0.020971610909435272 0.026325598249687113\n",
      "0.0\n",
      "Training  Processor_load_1_min\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.2590 - val_loss: 0.0506\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0823 - val_loss: 0.0340\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0647 - val_loss: 0.0290\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0536 - val_loss: 0.0395\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0462 - val_loss: 0.0395\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0409 - val_loss: 0.0479\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0369 - val_loss: 0.0496\n",
      "Epoch 8/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0342 - val_loss: 0.0564\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Processor_load_1_min/assets\n",
      "1.0 0.0\n",
      "0.0\n",
      "Agent_ping  constant 0s, not building a model\n",
      "1.2035984848484849 0.4919811526323489\n",
      "0.0\n",
      "Training  Num_of_running_processes\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 26ms/step - loss: 0.7738 - val_loss: 0.4704\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.3160 - val_loss: 0.0957\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 21ms/step - loss: 0.1627 - val_loss: 0.0638\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.1319 - val_loss: 0.0508\n",
      "Epoch 5/60\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "23/23 [==============================] - 0s 20ms/step - loss: 0.1154 - val_loss: 0.0428\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1042 - val_loss: 0.0375\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0958 - val_loss: 0.0335\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0906 - val_loss: 0.0296\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0832 - val_loss: 0.0281\n",
      "Epoch 10/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0789 - val_loss: 0.0253\n",
      "Epoch 11/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0755 - val_loss: 0.0226\n",
      "Epoch 12/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0711 - val_loss: 0.0231\n",
      "Epoch 13/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0680 - val_loss: 0.0211\n",
      "Epoch 14/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0647 - val_loss: 0.0191\n",
      "Epoch 15/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0612 - val_loss: 0.0196\n",
      "Epoch 16/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0584 - val_loss: 0.0207\n",
      "Epoch 17/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0557 - val_loss: 0.0183\n",
      "Epoch 18/60\n",
      "23/23 [==============================] - 0s 21ms/step - loss: 0.0527 - val_loss: 0.0181\n",
      "Epoch 19/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0504 - val_loss: 0.0197\n",
      "Epoch 20/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0474 - val_loss: 0.0197\n",
      "Epoch 21/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0453 - val_loss: 0.0228\n",
      "Epoch 22/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0433 - val_loss: 0.0228\n",
      "Epoch 23/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0409 - val_loss: 0.0219\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Num_of_running_processes/assets\n",
      "308.73690025252523 162.41903946756128\n",
      "0.0\n",
      "Training  ss_total\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_ss_total/assets\n",
      "0.022702966002714733 0.019529423635947882\n",
      "0.0\n",
      "Training  Processor_load_15_min\n",
      "Epoch 1/60\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/Users/baconbaker/anaconda3/envs/ml/lib/python3.8/site-packages/numpy/core/fromnumeric.py:90: RuntimeWarning: overflow encountered in reduce\n",
      "  return ufunc.reduce(obj, axis, dtype, out, **passkwargs)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "179/179 [==============================] - 6s 31ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 5s 31ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Processor_load_15_min/assets\n",
      "0.01781405833333333 0.46865586423310707\n",
      "0.0\n",
      "Training  Page_pi\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Page_pi/assets\n",
      "0.06675624836642571 0.6148191136035668\n",
      "0.0\n",
      "Training  Disk_avgqu_sz\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 34ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Disk_avgqu_sz/assets\n",
      "0.38053729852583734 0.5440082533233043\n",
      "0.0\n",
      "Training  Disk_wr_kbs\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.2926 - val_loss: 0.0198\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0945 - val_loss: 0.0161\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0766 - val_loss: 0.0145\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0665 - val_loss: 0.0170\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0589 - val_loss: 0.0243\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0534 - val_loss: 0.0236\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0493 - val_loss: 0.0278\n",
      "Epoch 8/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0453 - val_loss: 0.0298\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Disk_wr_kbs/assets\n",
      "2.174999842166735 74.21178557650839\n",
      "0.0\n",
      "Training  Disk_await\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.2433 - val_loss: 0.0123\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0713 - val_loss: 0.0112\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0550 - val_loss: 0.0153\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0451 - val_loss: 0.0248\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0384 - val_loss: 0.0310\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0333 - val_loss: 0.0331\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0302 - val_loss: 0.0343\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Disk_await/assets\n",
      "259892.56755050505 233136.45937071973\n",
      "0.0\n",
      "Training  Shared_memory\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 27ms/step - loss: 0.2999 - val_loss: 0.2118\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 21ms/step - loss: 0.1408 - val_loss: 0.1723\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 21ms/step - loss: 0.0903 - val_loss: 0.1415\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 21ms/step - loss: 0.0703 - val_loss: 0.1163\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0574 - val_loss: 0.0931\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0485 - val_loss: 0.0680\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0403 - val_loss: 0.0500\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0370 - val_loss: 0.0392\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0321 - val_loss: 0.0307\n",
      "Epoch 10/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0294 - val_loss: 0.0252\n",
      "Epoch 11/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0276 - val_loss: 0.0238\n",
      "Epoch 12/60\n",
      "23/23 [==============================] - 0s 21ms/step - loss: 0.0260 - val_loss: 0.0232\n",
      "Epoch 13/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0252 - val_loss: 0.0228\n",
      "Epoch 14/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0232 - val_loss: 0.0193\n",
      "Epoch 15/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0230 - val_loss: 0.0181\n",
      "Epoch 16/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0230 - val_loss: 0.0203\n",
      "Epoch 17/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0209 - val_loss: 0.0189\n",
      "Epoch 18/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0200 - val_loss: 0.0185\n",
      "Epoch 19/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0200 - val_loss: 0.0171\n",
      "Epoch 20/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0193 - val_loss: 0.0173\n",
      "Epoch 21/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0184 - val_loss: 0.0172\n",
      "Epoch 22/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0186 - val_loss: 0.0170\n",
      "Epoch 23/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0176 - val_loss: 0.0171\n",
      "Epoch 24/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0176 - val_loss: 0.0174\n",
      "Epoch 25/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0173 - val_loss: 0.0161\n",
      "Epoch 26/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0163 - val_loss: 0.0158\n",
      "Epoch 27/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0162 - val_loss: 0.0153\n",
      "Epoch 28/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0152 - val_loss: 0.0147\n",
      "Epoch 29/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0154 - val_loss: 0.0151\n",
      "Epoch 30/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0148 - val_loss: 0.0140\n",
      "Epoch 31/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0149 - val_loss: 0.0145\n",
      "Epoch 32/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0137 - val_loss: 0.0146\n",
      "Epoch 33/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0137 - val_loss: 0.0135\n",
      "Epoch 34/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0138 - val_loss: 0.0136\n",
      "Epoch 35/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0133 - val_loss: 0.0136\n",
      "Epoch 36/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0127 - val_loss: 0.0136\n",
      "Epoch 37/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0124 - val_loss: 0.0131\n",
      "Epoch 38/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0128 - val_loss: 0.0134\n",
      "Epoch 39/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0130 - val_loss: 0.0131\n",
      "Epoch 40/60\n",
      "23/23 [==============================] - 0s 21ms/step - loss: 0.0132 - val_loss: 0.0153\n",
      "Epoch 41/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0126 - val_loss: 0.0132\n",
      "Epoch 42/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0110 - val_loss: 0.0141\n",
      "Epoch 43/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0112 - val_loss: 0.0138\n",
      "Epoch 44/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0114 - val_loss: 0.0134\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Shared_memory/assets\n",
      "0.9540035042772816 1.041484054843113\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.0\n",
      "Training  CPU_user_time\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.2894 - val_loss: 0.0239\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0953 - val_loss: 0.0191\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0784 - val_loss: 0.0198\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0660 - val_loss: 0.0303\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0565 - val_loss: 0.0342\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0501 - val_loss: 0.0386\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0459 - val_loss: 0.0400\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_CPU_user_time/assets\n",
      "1.0480545471763627 27.204201093303094\n",
      "0.0\n",
      "Training  Disk_svctm\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.2055 - val_loss: 0.0252\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0639 - val_loss: 0.0190\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0496 - val_loss: 0.0178\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 34ms/step - loss: 0.0412 - val_loss: 0.0226\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0350 - val_loss: 0.0299\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0304 - val_loss: 0.0327\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0269 - val_loss: 0.0435\n",
      "Epoch 8/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0244 - val_loss: 0.0432\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Disk_svctm/assets\n",
      "6.076044067047571 8.172712272748084\n",
      "0.0\n",
      "Training  Disk_wr_ios\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.2609 - val_loss: 0.0215\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 5s 31ms/step - loss: 0.0927 - val_loss: 0.0163\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0789 - val_loss: 0.0143\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0695 - val_loss: 0.0177\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 5s 30ms/step - loss: 0.0613 - val_loss: 0.0263\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 5s 30ms/step - loss: 0.0538 - val_loss: 0.0306\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 5s 30ms/step - loss: 0.0472 - val_loss: 0.0362\n",
      "Epoch 8/60\n",
      "179/179 [==============================] - 5s 30ms/step - loss: 0.0427 - val_loss: 0.0390\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Disk_wr_ios/assets\n",
      "34.806530618686864 23.592094024554243\n",
      "0.0\n",
      "Training  Memory_used_pct\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.2426 - val_loss: 0.0540\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0568 - val_loss: 0.0180\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 5s 30ms/step - loss: 0.0411 - val_loss: 0.0180\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0345 - val_loss: 0.0246\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0297 - val_loss: 0.0318\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 5s 29ms/step - loss: 0.0265 - val_loss: 0.0348\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0241 - val_loss: 0.0399\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Memory_used_pct/assets\n",
      "0.07956238028346854 0.2786027163953785\n",
      "0.0\n",
      "Training  CPU_iowait_time\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 34ms/step - loss: 0.2631 - val_loss: 0.0388\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0846 - val_loss: 0.0298\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0679 - val_loss: 0.0246\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0557 - val_loss: 0.0275\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0461 - val_loss: 0.0405\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0398 - val_loss: 0.0438\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0367 - val_loss: 0.0536\n",
      "Epoch 8/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0340 - val_loss: 0.0505\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_CPU_iowait_time/assets\n",
      "1.064709595959596 1.2004648577156891\n",
      "0.0\n",
      "Training  System_wait_queue_length\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 23ms/step - loss: 0.9076 - val_loss: 0.5263\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - ETA: 0s - loss: 0.422 - 0s 19ms/step - loss: 0.4058 - val_loss: 0.1232\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.2123 - val_loss: 0.0679\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1718 - val_loss: 0.0549\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.1540 - val_loss: 0.0472\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1408 - val_loss: 0.0430\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.1320 - val_loss: 0.0388\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1245 - val_loss: 0.0356\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1188 - val_loss: 0.0331\n",
      "Epoch 10/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.1134 - val_loss: 0.0325\n",
      "Epoch 11/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.1092 - val_loss: 0.0310\n",
      "Epoch 12/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.1047 - val_loss: 0.0279\n",
      "Epoch 13/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.1015 - val_loss: 0.0281\n",
      "Epoch 14/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0976 - val_loss: 0.0283\n",
      "Epoch 15/60\n",
      "23/23 [==============================] - 0s 14ms/step - loss: 0.0944 - val_loss: 0.0277\n",
      "Epoch 16/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0922 - val_loss: 0.0267\n",
      "Epoch 17/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0886 - val_loss: 0.0275\n",
      "Epoch 18/60\n",
      "23/23 [==============================] - 0s 14ms/step - loss: 0.0860 - val_loss: 0.0287\n",
      "Epoch 19/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0828 - val_loss: 0.0275\n",
      "Epoch 20/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0804 - val_loss: 0.0286\n",
      "Epoch 21/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0778 - val_loss: 0.0300\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_System_wait_queue_length/assets\n",
      "0.6508437165630228 0.8936402711124123\n",
      "0.0\n",
      "Training  CPU_system_time\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.2821 - val_loss: 0.0253\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0944 - val_loss: 0.0201\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0796 - val_loss: 0.0182\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0709 - val_loss: 0.0231\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0638 - val_loss: 0.0293\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0577 - val_loss: 0.0350\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0524 - val_loss: 0.0356\n",
      "Epoch 8/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: 0.0479 - val_loss: 0.0371\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_CPU_system_time/assets\n",
      "1.740136999273967e-05 0.00046046018218668706\n",
      "0.0\n",
      "Training  Disk_rd_kbs\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 5s 31ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 5s 30ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Disk_rd_kbs/assets\n",
      "25.686795522095956 23.42823532661403\n",
      "0.0\n",
      "Training  Memory_available\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 5s 30ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 5s 30ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 31ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Memory_available/assets\n",
      "10.990583126483587 10.092498753962944\n",
      "0.0\n",
      "Training  Memory_used\n",
      "Epoch 1/60\n",
      "179/179 [==============================] - 6s 34ms/step - loss: 0.1996 - val_loss: 0.0148\n",
      "Epoch 2/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0534 - val_loss: 0.0063\n",
      "Epoch 3/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0407 - val_loss: 0.0056\n",
      "Epoch 4/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0358 - val_loss: 0.0067\n",
      "Epoch 5/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0320 - val_loss: 0.0104\n",
      "Epoch 6/60\n",
      "179/179 [==============================] - 6s 32ms/step - loss: 0.0285 - val_loss: 0.0180\n",
      "Epoch 7/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0255 - val_loss: 0.0219\n",
      "Epoch 8/60\n",
      "179/179 [==============================] - 6s 33ms/step - loss: 0.0232 - val_loss: 0.0248\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Memory_used/assets\n",
      "0.01231060606060606 0.21507502141023463\n",
      "0.0\n",
      "Training  System_block_queue_length\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 23ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_System_block_queue_length/assets\n",
      "656.2424045138889 2907.796479435591\n",
      "0.0\n",
      "Training  Received_packets\n",
      "Epoch 1/60\n",
      "75/75 [==============================] - 2s 21ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "75/75 [==============================] - 1s 19ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "75/75 [==============================] - 1s 19ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "75/75 [==============================] - 1s 20ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "75/75 [==============================] - 1s 19ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Received_packets/assets\n",
      "18.79196514520202 22.549992990819174\n",
      "0.0\n",
      "Training  Memory_free\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 25ms/step - loss: 0.5482 - val_loss: 0.1983\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.2269 - val_loss: 0.1293\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1617 - val_loss: 0.0993\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.1368 - val_loss: 0.0855\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.1112 - val_loss: 0.0670\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0900 - val_loss: 0.0568\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0787 - val_loss: 0.0469\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0702 - val_loss: 0.0393\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0637 - val_loss: 0.0341\n",
      "Epoch 10/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0586 - val_loss: 0.0306\n",
      "Epoch 11/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0544 - val_loss: 0.0280\n",
      "Epoch 12/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0511 - val_loss: 0.0253\n",
      "Epoch 13/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0487 - val_loss: 0.0241\n",
      "Epoch 14/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0459 - val_loss: 0.0217\n",
      "Epoch 15/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0438 - val_loss: 0.0222\n",
      "Epoch 16/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0421 - val_loss: 0.0199\n",
      "Epoch 17/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0407 - val_loss: 0.0198\n",
      "Epoch 18/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0394 - val_loss: 0.0197\n",
      "Epoch 19/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0381 - val_loss: 0.0188\n",
      "Epoch 20/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0372 - val_loss: 0.0195\n",
      "Epoch 21/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0362 - val_loss: 0.0190\n",
      "Epoch 22/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0353 - val_loss: 0.0194\n",
      "Epoch 23/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0346 - val_loss: 0.0177\n",
      "Epoch 24/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0339 - val_loss: 0.0182\n",
      "Epoch 25/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0330 - val_loss: 0.0165\n",
      "Epoch 26/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0323 - val_loss: 0.0175\n",
      "Epoch 27/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0321 - val_loss: 0.0185\n",
      "Epoch 28/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0310 - val_loss: 0.0183\n",
      "Epoch 29/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0306 - val_loss: 0.0184\n",
      "Epoch 30/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0303 - val_loss: 0.0176\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Memory_free/assets\n",
      "467.9463383838384 9896.028618186094\n",
      "0.0\n",
      "Training  Sent_queue\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 24ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Sent_queue/assets\n",
      "6.041893767203283 5.827475010174856\n",
      "0.0\n",
      "Training  Cache_used\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 23ms/step - loss: 0.4595 - val_loss: 0.2413\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.2031 - val_loss: 0.1563\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1547 - val_loss: 0.0940\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.1203 - val_loss: 0.0683\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0919 - val_loss: 0.0532\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0732 - val_loss: 0.0454\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0626 - val_loss: 0.0368\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0562 - val_loss: 0.0314\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0512 - val_loss: 0.0277\n",
      "Epoch 10/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0472 - val_loss: 0.0268\n",
      "Epoch 11/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0436 - val_loss: 0.0256\n",
      "Epoch 12/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0396 - val_loss: 0.0246\n",
      "Epoch 13/60\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0371 - val_loss: 0.0220\n",
      "Epoch 14/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0344 - val_loss: 0.0211\n",
      "Epoch 15/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0332 - val_loss: 0.0221\n",
      "Epoch 16/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0317 - val_loss: 0.0194\n",
      "Epoch 17/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0310 - val_loss: 0.0224\n",
      "Epoch 18/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0296 - val_loss: 0.0230\n",
      "Epoch 19/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0285 - val_loss: 0.0204\n",
      "Epoch 20/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0279 - val_loss: 0.0210\n",
      "Epoch 21/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0270 - val_loss: 0.0203\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Cache_used/assets\n",
      "374.8710542929293 29373.485202288623\n",
      "0.0\n",
      "Training  Received_queue\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 22ms/step - loss: 0.4019 - val_loss: 3.5527e-04\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.1874 - val_loss: 0.0020\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0633 - val_loss: 9.0813e-04\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0474 - val_loss: 8.7475e-04\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0410 - val_loss: 7.4288e-04\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0387 - val_loss: 3.6836e-04\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Received_queue/assets\n",
      "0.8540033622159091 1.6242266498839186\n",
      "0.0\n",
      "Training  Buffers_used\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 24ms/step - loss: 0.3077 - val_loss: 0.1337\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0869 - val_loss: 0.0614\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0405 - val_loss: 0.0479\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0292 - val_loss: 0.0360\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0224 - val_loss: 0.0282\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0184 - val_loss: 0.0239\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 14ms/step - loss: 0.0159 - val_loss: 0.0239\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0141 - val_loss: 0.0214\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0125 - val_loss: 0.0201\n",
      "Epoch 10/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0111 - val_loss: 0.0200\n",
      "Epoch 11/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0107 - val_loss: 0.0200\n",
      "Epoch 12/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0098 - val_loss: 0.0211\n",
      "Epoch 13/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0095 - val_loss: 0.0206\n",
      "Epoch 14/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0090 - val_loss: 0.0216\n",
      "Epoch 15/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0084 - val_loss: 0.0212\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Buffers_used/assets\n",
      "52.74369157512627 66.8962677853678\n",
      "0.0\n",
      "Training  FS_used_space\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 26ms/step - loss: 0.4595 - val_loss: 0.1628\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1644 - val_loss: 0.0848\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1153 - val_loss: 0.0640\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0904 - val_loss: 0.0440\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0686 - val_loss: 0.0329\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0573 - val_loss: 0.0267\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0510 - val_loss: 0.0229\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0459 - val_loss: 0.0197\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0425 - val_loss: 0.0178\n",
      "Epoch 10/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0394 - val_loss: 0.0153\n",
      "Epoch 11/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0369 - val_loss: 0.0138\n",
      "Epoch 12/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0348 - val_loss: 0.0128\n",
      "Epoch 13/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0329 - val_loss: 0.0116\n",
      "Epoch 14/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0310 - val_loss: 0.0098\n",
      "Epoch 15/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0297 - val_loss: 0.0095\n",
      "Epoch 16/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0285 - val_loss: 0.0095\n",
      "Epoch 17/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0273 - val_loss: 0.0095\n",
      "Epoch 18/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0264 - val_loss: 0.0097\n",
      "Epoch 19/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0254 - val_loss: 0.0090\n",
      "Epoch 20/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0247 - val_loss: 0.0068\n",
      "Epoch 21/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0240 - val_loss: 0.0067\n",
      "Epoch 22/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0232 - val_loss: 0.0082\n",
      "Epoch 23/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0229 - val_loss: 0.0069\n",
      "Epoch 24/60\n",
      "23/23 [==============================] - 0s 14ms/step - loss: 0.0221 - val_loss: 0.0079\n",
      "Epoch 25/60\n",
      "23/23 [==============================] - 0s 14ms/step - loss: 0.0219 - val_loss: 0.0075\n",
      "Epoch 26/60\n",
      "23/23 [==============================] - 0s 14ms/step - loss: 0.0211 - val_loss: 0.0095\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_FS_used_space/assets\n",
      "626.4448061342592 2867.3142941127176\n",
      "0.0\n",
      "Training  Sent_packets\n",
      "Epoch 1/60\n",
      "75/75 [==============================] - 1s 17ms/step - loss: nan - val_loss: nan\n",
      "Epoch 2/60\n",
      "75/75 [==============================] - 1s 17ms/step - loss: nan - val_loss: nan\n",
      "Epoch 3/60\n",
      "75/75 [==============================] - 1s 18ms/step - loss: nan - val_loss: nan\n",
      "Epoch 4/60\n",
      "75/75 [==============================] - 1s 16ms/step - loss: nan - val_loss: nan\n",
      "Epoch 5/60\n",
      "75/75 [==============================] - 1s 17ms/step - loss: nan - val_loss: nan\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Sent_packets/assets\n",
      "36.93755748106061 20.123592429598276\n",
      "0.0\n",
      "Training  FS_used_pct\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.4983 - val_loss: 0.3174\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.2235 - val_loss: 0.1125\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.1393 - val_loss: 0.0709\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.1071 - val_loss: 0.0610\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0906 - val_loss: 0.0486\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0731 - val_loss: 0.0372\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0614 - val_loss: 0.0307\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0543 - val_loss: 0.0273\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0491 - val_loss: 0.0235\n",
      "Epoch 10/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0455 - val_loss: 0.0218\n",
      "Epoch 11/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0423 - val_loss: 0.0184\n",
      "Epoch 12/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0397 - val_loss: 0.0183\n",
      "Epoch 13/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0374 - val_loss: 0.0167\n",
      "Epoch 14/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0355 - val_loss: 0.0161\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Epoch 15/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0335 - val_loss: 0.0148\n",
      "Epoch 16/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0319 - val_loss: 0.0145\n",
      "Epoch 17/60\n",
      "23/23 [==============================] - 0s 14ms/step - loss: 0.0306 - val_loss: 0.0126\n",
      "Epoch 18/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0294 - val_loss: 0.0137\n",
      "Epoch 19/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0281 - val_loss: 0.0151\n",
      "Epoch 20/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0272 - val_loss: 0.0144\n",
      "Epoch 21/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0261 - val_loss: 0.0146\n",
      "Epoch 22/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0253 - val_loss: 0.0132\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_FS_used_pct/assets\n",
      "109.84816363636362 108.01236941873964\n",
      "0.0\n",
      "Training  FS_total_space\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 0s 22ms/step - loss: 0.0954 - val_loss: 2.8374e-04\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0255 - val_loss: 7.2293e-05\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0068 - val_loss: 4.8087e-05\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0051 - val_loss: 1.1920e-06\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0043 - val_loss: 2.3610e-06\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0033 - val_loss: 4.7280e-06\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0026 - val_loss: 6.7226e-06\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0021 - val_loss: 5.5826e-06\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0018 - val_loss: 4.6808e-06\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_FS_total_space/assets\n",
      "54.000631313131315 32.617493278821435\n",
      "0.0\n",
      "Training  FS_max_util\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 0s 22ms/step - loss: 0.1078 - val_loss: 0.0609\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0616 - val_loss: 0.0461\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0440 - val_loss: 0.0282\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0329 - val_loss: 0.0166\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0245 - val_loss: 0.0109\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0211 - val_loss: 0.0085\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0185 - val_loss: 0.0068\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0173 - val_loss: 0.0063\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0164 - val_loss: 0.0058\n",
      "Epoch 10/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0153 - val_loss: 0.0057\n",
      "Epoch 11/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0153 - val_loss: 0.0057\n",
      "Epoch 12/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0147 - val_loss: 0.0045\n",
      "Epoch 13/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0138 - val_loss: 0.0047\n",
      "Epoch 14/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0133 - val_loss: 0.0044\n",
      "Epoch 15/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0126 - val_loss: 0.0046\n",
      "Epoch 16/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0125 - val_loss: 0.0045\n",
      "Epoch 17/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0120 - val_loss: 0.0037\n",
      "Epoch 18/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0117 - val_loss: 0.0040\n",
      "Epoch 19/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0111 - val_loss: 0.0039\n",
      "Epoch 20/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0112 - val_loss: 0.0042\n",
      "Epoch 21/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0116 - val_loss: 0.0037\n",
      "Epoch 22/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0107 - val_loss: 0.0036\n",
      "Epoch 23/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0105 - val_loss: 0.0033\n",
      "Epoch 24/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0098 - val_loss: 0.0035\n",
      "Epoch 25/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0101 - val_loss: 0.0038\n",
      "Epoch 26/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0095 - val_loss: 0.0031\n",
      "Epoch 27/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0095 - val_loss: 0.0036\n",
      "Epoch 28/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0092 - val_loss: 0.0034\n",
      "Epoch 29/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0091 - val_loss: 0.0030\n",
      "Epoch 30/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0085 - val_loss: 0.0030\n",
      "Epoch 31/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0084 - val_loss: 0.0029\n",
      "Epoch 32/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0083 - val_loss: 0.0028\n",
      "Epoch 33/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0080 - val_loss: 0.0026\n",
      "Epoch 34/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0083 - val_loss: 0.0028\n",
      "Epoch 35/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0079 - val_loss: 0.0025\n",
      "Epoch 36/60\n",
      "23/23 [==============================] - 0s 14ms/step - loss: 0.0079 - val_loss: 0.0031\n",
      "Epoch 37/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0080 - val_loss: 0.0024\n",
      "Epoch 38/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0076 - val_loss: 0.0024\n",
      "Epoch 39/60\n",
      "23/23 [==============================] - 0s 15ms/step - loss: 0.0074 - val_loss: 0.0025\n",
      "Epoch 40/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0072 - val_loss: 0.0024\n",
      "Epoch 41/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0071 - val_loss: 0.0022\n",
      "Epoch 42/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0070 - val_loss: 0.0021\n",
      "Epoch 43/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0068 - val_loss: 0.0022\n",
      "Epoch 44/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0065 - val_loss: 0.0025\n",
      "Epoch 45/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0067 - val_loss: 0.0022\n",
      "Epoch 46/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0066 - val_loss: 0.0030\n",
      "Epoch 47/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0065 - val_loss: 0.0022\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_FS_max_util/assets\n",
      "1.0 0.0\n",
      "0.0\n",
      "ICMP_ping  constant 0s, not building a model\n",
      "16.732489016729797 11.881892074368993\n",
      "0.0\n",
      "Training  FS_max_avail\n",
      "Epoch 1/60\n",
      "23/23 [==============================] - 1s 23ms/step - loss: 0.5687 - val_loss: 0.1504\n",
      "Epoch 2/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.2106 - val_loss: 0.1068\n",
      "Epoch 3/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.1448 - val_loss: 0.0698\n",
      "Epoch 4/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.1104 - val_loss: 0.0561\n",
      "Epoch 5/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0883 - val_loss: 0.0423\n",
      "Epoch 6/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0734 - val_loss: 0.0340\n",
      "Epoch 7/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0639 - val_loss: 0.0288\n",
      "Epoch 8/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0569 - val_loss: 0.0244\n",
      "Epoch 9/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0518 - val_loss: 0.0211\n",
      "Epoch 10/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0480 - val_loss: 0.0198\n",
      "Epoch 11/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0442 - val_loss: 0.0174\n",
      "Epoch 12/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0410 - val_loss: 0.0150\n",
      "Epoch 13/60\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0387 - val_loss: 0.0153\n",
      "Epoch 14/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0368 - val_loss: 0.0151\n",
      "Epoch 15/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0351 - val_loss: 0.0137\n",
      "Epoch 16/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0336 - val_loss: 0.0148\n",
      "Epoch 17/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0325 - val_loss: 0.0134\n",
      "Epoch 18/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0309 - val_loss: 0.0140\n",
      "Epoch 19/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0300 - val_loss: 0.0139\n",
      "Epoch 20/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0291 - val_loss: 0.0125\n",
      "Epoch 21/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0278 - val_loss: 0.0140\n",
      "Epoch 22/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0271 - val_loss: 0.0135\n",
      "Epoch 23/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0265 - val_loss: 0.0131\n",
      "Epoch 24/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0257 - val_loss: 0.0146\n",
      "Epoch 25/60\n",
      "23/23 [==============================] - 0s 20ms/step - loss: 0.0250 - val_loss: 0.0122\n",
      "Epoch 26/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0246 - val_loss: 0.0128\n",
      "Epoch 27/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0236 - val_loss: 0.0122\n",
      "Epoch 28/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0233 - val_loss: 0.0133\n",
      "Epoch 29/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0229 - val_loss: 0.0129\n",
      "Epoch 30/60\n",
      "23/23 [==============================] - 0s 16ms/step - loss: 0.0222 - val_loss: 0.0121\n",
      "Epoch 31/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0220 - val_loss: 0.0123\n",
      "Epoch 32/60\n",
      "23/23 [==============================] - 0s 17ms/step - loss: 0.0217 - val_loss: 0.0135\n",
      "Epoch 33/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0212 - val_loss: 0.0147\n",
      "Epoch 34/60\n",
      "23/23 [==============================] - 0s 19ms/step - loss: 0.0210 - val_loss: 0.0139\n",
      "Epoch 35/60\n",
      "23/23 [==============================] - 0s 18ms/step - loss: 0.0206 - val_loss: 0.0130\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_FS_max_avail/assets\n",
      "36.6769795 24.140400216095355\n",
      "4.94065644118295e-309\n",
      "Training  Memory_total\n",
      "Epoch 1/60\n",
      "2/2 [==============================] - 0s 64ms/step - loss: 0.0508 - val_loss: 3.3005e-05\n",
      "Epoch 2/60\n",
      "2/2 [==============================] - 0s 12ms/step - loss: 0.0484 - val_loss: 1.3500e-04\n",
      "Epoch 3/60\n",
      "2/2 [==============================] - 0s 13ms/step - loss: 0.0471 - val_loss: 3.3502e-04\n",
      "Epoch 4/60\n",
      "2/2 [==============================] - 0s 11ms/step - loss: 0.0459 - val_loss: 6.5620e-04\n",
      "Epoch 5/60\n",
      "2/2 [==============================] - 0s 11ms/step - loss: 0.0447 - val_loss: 0.0011\n",
      "Epoch 6/60\n",
      "2/2 [==============================] - 0s 8ms/step - loss: 0.0437 - val_loss: 0.0017\n",
      "INFO:tensorflow:Assets written to: ../../../data/vae/db_oracle_11g_Memory_total/assets\n"
     ]
    }
   ],
   "source": [
    "def normalise(df):\n",
    "    mean = df['value'].mean()\n",
    "    std = df['value'].std()\n",
    "    if std == 0:\n",
    "        df['value'] = df['value'] - mean\n",
    "        return df\n",
    "    df['value'] = (df['value'] - mean) / std\n",
    "    return df\n",
    "\n",
    "def gen_train_seq(values, time_steps=288):\n",
    "    output = []\n",
    "    for i in range(len(values) - time_steps):\n",
    "        output.append(values[i : (i + time_steps)])\n",
    "    return np.stack(output)\n",
    "\n",
    "\n",
    "models = []\n",
    "histories = []\n",
    "df=dfs['os_linux']\n",
    "for name in list(df['name'].unique()):\n",
    "    df_n = df[df.name == name]\n",
    "\n",
    "    if df_n['value'].mean() == 0:\n",
    "        continue\n",
    "    print(df_n['value'].mean(), df_n['value'].std())\n",
    "\n",
    "    if df_n.shape[0] >30000:\n",
    "        time_step = 288\n",
    "    elif df_n.shape[0] > 5000:\n",
    "        time_step = 144\n",
    "    else:\n",
    "        time_step = 12\n",
    "\n",
    "    x_train=np.empty((1,time_step,1))\n",
    "\n",
    "    for host in list(df_n['cmdb_id'].unique()):\n",
    "        df_nh = df_n[df_n.cmdb_id==host][['value']]\n",
    "        df_nh = normalise(df_nh)\n",
    "        x_train = np.concatenate((x_train, gen_train_seq(df_nh.values, time_step)), axis=0)\n",
    "\n",
    "    nan_in = np.isnan(x_train)\n",
    "    x_train[nan_in] = 0\n",
    "\n",
    "    print(x_train[0][0][0])\n",
    "    if np.sum(x_train) < .1 and np.sum(x_train) > -.1:\n",
    "        print(name, ' constant 0s, not building a model')\n",
    "    else:\n",
    "        print('Training ', name)\n",
    "        model = get_model(x_train)\n",
    "        history = train_model(model, x_train)\n",
    "\n",
    "        model.save('../../../data/vae/' + str(key) + '_' + name)\n",
    "        models.append(model)\n",
    "        histories.append(history)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
